<template>
  <div>仓库页面</div>
  <p>num: {{ num }}</p>
  <button @click="fn">btn</button>
</template>

<script setup>
// this.$store.state.num

import { ref, computed } from "vue";
import { useStore } from "vuex";

const store = useStore();
// const num = ref(store.state.num);

const num = computed(() => store.state.num);

const fn = () => {
  store.commit("changeNum");
};
</script>
